Subject: Re: Bitplanes
From: "Andrew Church" <[email-masked]>
To: "amos-list" <[email-masked]>
Date: 27 Sep 93 21:23:00 EST

A little clarification here...

>In every bitplane, one bit represents one pixel, so a byte (8 bits)
>of a bitplane would be 8 pixels across.
>At it's simplest, with one bit plane wherever there's a set bit 
>in the bitplane that pixel will be in color 1, a binary 0 in
>one of the bits means color 0 at that pixel.

  This is right.  However...

>To get more colors the system adds up the bits of all the planes
>at a certian pixel and that makes the color number.
>Say at pixel A plane 1 is set to 0, plane 2 is set to 1, and plane
>3 is set to 1, combining those will make the binary number %011
>which is 6 in normal numbers, so at that pixel there would be
>color 6.

  This is wrong -- you're numbering the planes backwards.  What you should
have said is this:

Say at pixel A plane *2* is set to 0, plane *1* is set to 1, and plane
*0* is set to 1, combining those...

  The plane number is the same as the bit number in the colour.  So plane 0
corresponds to bit 0 (the least significant bit), plane 1 corresponds to bit
1, etc.

  You also don't know as much about binary as you seem to think you know.  The
binary number 011 is equal to 3 in decimal (0*2^2 + 1*2^1 + 1*2^0 = 0+2+1 = 3).

>Now to change the colors of bobs you can tell the blitter NOT
>to draw certian planes, so if in the above example you told the
>blitter NOT to draw plane 2 the color would be %001, or 4.
                                                      ^^^^ NO!!! 1, not 4!!!

  You'd tell it not to draw plane 1 in order to get %001 from the above case.
That is, you'd use "Set Bob N,,%11111101," where N is your bob number.

  --Andy Church